package com.example.attendance_back.mapper;

import com.example.attendance_back.model.Student;
import com.example.attendance_back.model.StudentSign;
import com.example.attendance_back.model.StudentSignWrapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

@Mapper
public interface StudentSignMapper {

  @Insert("insert into student_sign(sign_id,student_id,sign_time) " +
          "values(#{signId},#{studentId},#{sign_time})")
  int insert(StudentSign studentSign);

  int update(StudentSign studentSign);

//  @Results(id = "stuSignMap",value = {
//          @Result(column = "student_sign_id",property = "studentSignId"
//                  ,jdbcType = JdbcType.INTEGER,id = true),
//          @Result(column = "sign_id",property = "signId",jdbcType = JdbcType.INTEGER),
//          @Result(column = "student_id",property = "studentId",jdbcType = JdbcType.INTEGER),
//          @Result(column = "sign_time",property = "sign_time",jdbcType = JdbcType.DATE),
//  })
  List<StudentSignWrapper> selectByExample(StudentSignWrapper studentSign);




}
